package edu.kjxy.day03.synchronizedBlockLockAll.test1;

/**
 * 功能:使用不同的对象监视器
 * 异步调用
 * 作者:程序员欧阳子韩
 * 日期:2024/2/2 19:46
 */
public class RunTest2 {
    public static void main(String[] args) {
        Service service = new Service();
        MyObject object = new MyObject();
        MyObject object1 = new MyObject();
        ThreadA a = new ThreadA(service,object);
        a.setName("a");
        a.start();
        ThreadB b = new ThreadB(service,object1);
        b.setName("b");
        b.start();
    }
}
